package com.jrx.anytxn.transaction.job.cmpsCrt.step;

import com.jrx.anytxn.transaction.mapper.ext.ExtBtGuaranteeListMapper;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionListener;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 代偿回购准备作业监听类
 */
@Service
public class CmpsCrtPreListener implements JobExecutionListener {

    @Resource
    private ExtBtGuaranteeListMapper extBtGuaranteeListMapper;

    @Override
    public void beforeJob(JobExecution jobExecution) {
        //每次启动先清空准备表数据
        extBtGuaranteeListMapper.deleteAll();
    }

    @Override
    public void afterJob(JobExecution jobExecution) {

    }
}
